home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1402_point_base_view_conversion.rtf < prev    next >
Text File  |  1993-11-08  |  928b  |  24 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f3\fmodern Ohlfs;}
  2. \paperw10740
  3. \paperh8340
  4. \margl120
  5. \margr120
  6. {\colortbl;\red84\green84\blue84;\red83\green83\blue83;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  I would like to convert a point returned in an NXEvent from its base coordinates to a view coordinate system.  There are several routines to convert coordinates between views and between the screen and base coordinate systems, but I have not found one to convert a base coordinate to a view's coordinate system.  How do I do this?\
  8.  
  9. \i     \
  10.  
  11. \i0 A:  Calling the following method with 
  12. \f1\fs24 aView == nil
  13. \f0\fs28  converts the point from the base coordinate system of the window to the view's coordinate system:\
  14. \
  15.  
  16. \f1\fs24\fi540 - convertPoint:(NXPoint *)aPoint  fromView:aView; \
  17.  
  18. \f0\fs28\fi0 \
  19. QA740\
  20. \
  21. Valid for 1.0, 2.0, 3.0\
  22. \
  23.  
  24.